 package com.iris.egrant.dao.proposal;
 


import com.iris.egrant.app.model.proposal.LocalProposalCached;
import com.iris.egrant.model.formInit.FormBaseLibrary;
import com.iris.egrant.model.proposal.ProposalCached;
import com.iris.egrant.orm.hibernate.HibernateDao;
import com.iris.egrant.system.model.OrgOffice;
import org.apache.commons.lang.StringUtils;
import org.hibernate.Query;
import org.springframework.stereotype.Repository;

import java.util.ArrayList;
import java.util.List;

 @Repository
 public class ProposalCachedLocalDao
   extends HibernateDao<LocalProposalCached, Long>
 {



       public LocalProposalCached viewProposal(Long posCode) {
//        /* 295 */     if (SecurityUtils.isAuthority("A_PROPOSAL_VIEW_PSN")) {
//            /* 296 */       String str = "from LocalProposalCached where psnCode=? and posCode=?";
//            /* 297 */       return (LocalProposalCached)findUnique(str, new Object[] { SecurityUtils.getCurrentUserId(), posCode });
//            /* 298 */     }  if (SecurityUtils.isAuthority("A_PROPOSAL_VIEW_PRJPSN")) {
//            /* 299 */       String str = "from LocalProposalCached where (psnCode=? or prjPsnCode=?) and posCode=?";
//            /* 300 */       return (LocalProposalCached)findUnique(str, new Object[] { SecurityUtils.getCurrentUserId(), SecurityUtils.getCurrentUserId(), posCode });
//                 }
//        /* 302 */     if (SecurityUtils.isAuthority("A_PROPOSAL_VIEW_ORG")) {
//            /* 303 */       String str = "from LocalProposalCached where (orgCode=? or dept_code=? ) and posCode=?";
//            /* 304 */       return (LocalProposalCached)findUnique(str, new Object[] { (SecurityUtils.getAdminOrgCode().longValue() == -1L) ? SecurityUtils.getCurrentOrgCode() : SecurityUtils.getAdminOrgCode(), SecurityUtils.getCurrentDeptCode(), posCode });
//                 }
        
        /* 307 */     String hql = "from LocalProposalCached where posCode=?";
        /* 308 */     return (LocalProposalCached)findUnique(hql, new Object[] { posCode });
           }
     /*     */   public List<ProposalCached> getProposalCachedListByPsnCode(Long psnCode, String strGrantCode, String statuses) {
         /*  34 */     Long subGrantCode = Long.valueOf(648L);
                    String minStatus = "98";
         /*  36 */     String maxStatus = "99";

                      String str = "from ProposalCached where psnCode=? and status=? and subGrantCode=?  and (status not in (?, ?) or status is null) order by updateDate desc";
         /*  40 */         return find(str, new Object[] { psnCode, "00", 20541L, minStatus, maxStatus });
         /*     */
         /*     */   }
}


/* Location:              D:\文件\123\WEB-INF\classes\!\com\iris\egrant\app\dao\ProposalCachedLocalDao.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       1.1.3
 */